document.ready(function() {
    webSpinner.spin(getItem('loadSpin'));

    setValue('menuid', getUrlParam('menuid'));
    queryKey('ok');
});

function queryKey(flag) {
    resetPageBar(flag);

    var param = {};
    param.ctrl = 'record';
    param.func = 'getReportList';
    param.reasonInfo = getAjaxValue('reasonInfo');
    param.statusInfo = getAjaxValue('statusInfo');
    param.page = getAjaxValue('page');

    sendAjax(param, function(result) {
        report.list = result.report;

        initPageBar(result.allPages);
        setHtml('listCount', result.listCount);

        setDisplay('loadSpin', 'none');
        setDisplay('mainBg', '');
        webSpinner.spin();
    });
}

function viewReportInfo(association, module0) {
    if (module0 == 'electronic') {
        openSlipIframeDiv('console.php?m=electronic&c=info&electronicid=' + association);
    }
    else if (module0 == 'housecraft') {
        openSlipIframeDiv('console.php?m=housecraft&c=info&housecraftid=' + association);
    }
    else if (module0 == 'other') {
        openSlipIframeDiv('console.php?m=other&c=info&otherid=' + association);
    }
}

function viewLog(reportid) {
    openSlipIframeDiv('console.php?m=record&c=log&association=' + reportid + '&title=' + escape('举报处理'));
}